package com.banyuan;

import java.io.*;

public class BufferReaderTest {
    public static void main(String[] args) {
        InputStream is = null;
        InputStreamReader isr = null;
        BufferedReader br = null;

        try {
            is = new FileInputStream("/Users/edy/Desktop/file/1.txt");
            isr = new InputStreamReader(is,"UTF-8");
            br = new BufferedReader(isr);

            String s ;
            while ((s = br.readLine()) != null ) {
                System.out.println(s);
            }

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            IOUtilis.closeQuiety(br);
            IOUtilis.closeQuiety(isr);
            IOUtilis.closeQuiety(is);
        }
    }
}
